package com.fandy.struts.DAL;



import  com.fandy.struts.SqlAccess.*;
import com.fandy.struts.SqlStatement.Client;

import java.sql.*;

public class DALClient {
 
	Client c =new Client();
	
	SqlServerHelper ssh = new SqlServerHelper() ;
	
	
	public   ResultSet  getAll()
	{
		return   ssh.executeScalar( c.getAll());
	}
	
	public   ResultSet getClientByID(int ID)
	{
		return ssh.executeScalar(c.getClientByID(ID));
	}	
 
	
	public int UpdateByID(int id,com.fandy.struts.Model.Client c) throws SQLException
	{
		
		return ssh.executeNoQuery(this.c.UpdateByID(id, c));
	}
	
	public int DeleteByID(int id) throws SQLException
	{
		
		return ssh.executeNoQuery(this.c.DeleteByID(id));
		
	}
	
	
	
}

